home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / OSAGeneric.p < prev    next >
Text File  |  1996-05-01  |  4KB  |  114 lines

  1. {
  2.      File:        OSAGeneric.p
  3.  
  4.      Contains:    AppleScript Generic Component Interfaces.
  5.  
  6.      Version:    Technology:    AppleScript 1.1
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT OSAGeneric;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __OSAGENERIC__}
  28. {$SETC __OSAGENERIC__ := 1}
  29.  
  30. {$I+}
  31. {$SETC OSAGenericIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __ERRORS__}
  35. {$I Errors.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __APPLEEVENTS__}
  38. {$I AppleEvents.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __OSA__}
  41. {$I OSA.p}
  42. {$ENDC}
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.  
  48. {$IFC FOR_SYSTEM7_ONLY }
  49. {
  50.      NOTE:    This interface defines a "generic scripting component."
  51.             The Generic Scripting Component allows automatic dispatch to a
  52.             specific scripting component that conforms to the OSA interface.
  53.             This component supports OSA, by calling AppleScript or some other 
  54.             scripting component.  Additionally it provides access to the default
  55.             and the user-prefered scripting component.
  56. }
  57.  
  58. CONST
  59.                                                                 {  Component version this header file describes  }
  60.     kGenericComponentVersion    = $0100;
  61.  
  62.     kGSSSelectGetDefaultScriptingComponent = $1001;
  63.     kGSSSelectSetDefaultScriptingComponent = $1002;
  64.     kGSSSelectGetScriptingComponent = $1003;
  65.     kGSSSelectGetScriptingComponentFromStored = $1004;
  66.     kGSSSelectGenericToRealID    = $1005;
  67.     kGSSSelectRealToGenericID    = $1006;
  68.     kGSSSelectOutOfRange        = $1007;
  69.  
  70.  
  71. TYPE
  72.     ScriptingComponentSelector            = OSType;
  73.     GenericID                            = OSAID;
  74. {  get and set the default scripting component  }
  75. FUNCTION OSAGetDefaultScriptingComponent(genericScriptingComponent: ComponentInstance; VAR scriptingSubType: ScriptingComponentSelector): OSAError;
  76.     {$IFC NOT GENERATINGCFM}
  77.     INLINE $2F3C, $0004, $1001, $7000, $A82A;
  78.     {$ENDC}
  79. FUNCTION OSASetDefaultScriptingComponent(genericScriptingComponent: ComponentInstance; scriptingSubType: ScriptingComponentSelector): OSAError;
  80.     {$IFC NOT GENERATINGCFM}
  81.     INLINE $2F3C, $0004, $1002, $7000, $A82A;
  82.     {$ENDC}
  83. {  get a scripting component instance from its subtype code  }
  84. FUNCTION OSAGetScriptingComponent(genericScriptingComponent: ComponentInstance; scriptingSubType: ScriptingComponentSelector; VAR scriptingInstance: ComponentInstance): OSAError;
  85.     {$IFC NOT GENERATINGCFM}
  86.     INLINE $2F3C, $0008, $1003, $7000, $A82A;
  87.     {$ENDC}
  88. {  get a scripting component selector (subType) from a stored script  }
  89. FUNCTION OSAGetScriptingComponentFromStored(genericScriptingComponent: ComponentInstance; {CONST}VAR scriptData: AEDesc; VAR scriptingSubType: ScriptingComponentSelector): OSAError;
  90.     {$IFC NOT GENERATINGCFM}
  91.     INLINE $2F3C, $0008, $1004, $7000, $A82A;
  92.     {$ENDC}
  93. {  get a real component instance and script id from a generic id  }
  94. FUNCTION OSAGenericToRealID(genericScriptingComponent: ComponentInstance; VAR theScriptID: OSAID; VAR theExactComponent: ComponentInstance): OSAError;
  95.     {$IFC NOT GENERATINGCFM}
  96.     INLINE $2F3C, $0008, $1005, $7000, $A82A;
  97.     {$ENDC}
  98. {  get a generic id from a real component instance and script id  }
  99. FUNCTION OSARealToGenericID(genericScriptingComponent: ComponentInstance; VAR theScriptID: OSAID; theExactComponent: ComponentInstance): OSAError;
  100.     {$IFC NOT GENERATINGCFM}
  101.     INLINE $2F3C, $0008, $1006, $7000, $A82A;
  102.     {$ENDC}
  103. {$ENDC}
  104. {$ALIGN RESET}
  105. {$POP}
  106.  
  107. {$SETC UsingIncludes := OSAGenericIncludes}
  108.  
  109. {$ENDC} {__OSAGENERIC__}
  110.  
  111. {$IFC NOT UsingIncludes}
  112.  END.
  113. {$ENDC}
  114.